<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "work".
 *
 * @property integer $work_id
 * @property integer $member_id
 * @property integer $member_name
 * @property integer $work_class_id
 * @property string $work_class_name
 * @property integer $start_time
 * @property integer $end_time
 * @property string $remark
 */
class Work extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'work';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['member_id', 'work_class_id', 'work_class_name', 'start_time', 'end_time'], 'required'],
            [['member_id', 'work_class_id', 'start_time', 'end_time'], 'integer'],
            [['work_class_name','member_name'], 'string', 'max' => 255],
            [['remark'], 'string', 'max' => 500],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'work_id' => '自增id',
            'member_id' => '用户id',
            'member_name' => '用户名称',
            'work_class_id' => '去向id',
            'work_class_name' => '去向名称',
            'start_time' => '开始时间',
            'end_time' => '结束时间',
            'remark' => '备注',
        ];
    }
}
